<template>
	<view class="container">
		<view class="content_box">
			<rich-text :nodes="richText"></rich-text>
		</view>
	</view>
</template>

<script>
	// import Auth from '@/shopro/permission/index.js';
	export default {
		components: {},
		data() {
			return {
				id: 0,
				richText: ''
			};
		},
		computed: {},
		onLoad(e) {
			this.id = e?.id;
			this.getRichText()
		},
		methods: {
			getRichText() {
				this.$util.loading('加载中');
				this.$http('common.richText', {
					id: this.id
				}).then(res => {
					uni.hideLoading()
					if (res.code === 1) {
						this.richText = res.data.article_content;
						uni.setNavigationBarTitle({
							title: res.data.name
						});
					}
				}).catch(err => {
					uni.hideLoading()
				});
			}
		}
	};
</script>

<style lang="scss">
	.content_box {
		background: #fff;
		padding: 30rpx;
		box-sizing: border-box;
		min-height: 100vh;
		width: 100vw;
	}
</style>
